home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / basdoc20.zip / BASDOC.TXT < prev    next >
Text File  |  1992-10-22  |  84KB  |  1,591 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                               BASIC Insight (tm)
  11.  
  12.                                  Version 2.00
  13.  
  14.                                  User's Manual
  15.  
  16.  
  17.  
  18.  
  19.                                Shareware Version
  20.  
  21.  
  22.  
  23.                    (C) Copyright 1992 - All Rights Reserved
  24.  
  25.  
  26.                               McKelvy Enterprises
  27.                               3149 Bradford Place
  28.                              Birmingham, AL  35242
  29.  
  30.                            CompuServe ID: 71477,3513
  31.  
  32.  
  33.       LICENSE
  34.  
  35.       The BASIC Insight software and manual are copyrighted, all rights are
  36.       reserved.  You have purchased a license to use this software on one
  37.       machine at a time.  You are authorized to make copies of BASIC Insight for
  38.       the sole purpose of backing up your software and protecting your
  39.       investment from loss.  
  40.  
  41.       Note:  This copy of BASIC Insight is being distributed as Shareware. This
  42.       means that you may copy the disk just as you received it and you may give
  43.       it to others for their trial use. You are also permitted and encouraged to
  44.       upload this version to electronic bulletin board services. You may not, 
  45.       however, resell or collect any fee for the distribution of BASIC Insight
  46.       without the permission of McKelvy Enterprises. (This does not include the
  47.       normal fees for using bulletin boards.) If you continue to use BASIC
  48.       Insight after your trial use, you must pay the purchase price as detailed
  49.       below.
  50.  
  51.       WARRANTY
  52.  
  53.       This software will perform as described herein only if properly applied. 
  54.       Our liability to you is limited to replacing the software (FOR REGISTERED
  55.       USERS ONLY).  We have no liability to you for any damage or loss (whether
  56.       special, incidental, or consequential) caused by this software, either
  57.       directly or indirectly.
  58.  
  59.       You agree to the terms of this license by your decision to use this
  60.       software.
  61.  
  62.       SHAREWARE
  63.  
  64.       BASIC Insight is copyrighted. It is not a public domain program. It is
  65.       being distributed as Shareware, which means that unmodified copies of the
  66.       software and documentation may be freely copied and shared. We ask in
  67.       return that should you find BASIC Insight to be a useful program, you
  68.       become a registered user by sending $30.00 to:
  69.  
  70.                        McKelvy Enterprises
  71.                        3149 Bradford Place
  72.                       Birmingham, AL  35242
  73.  
  74.       The file ORDER.FRM on the disk can be printed and used as an order form.
  75.  
  76.       By becoming a registered user, you get:
  77.  
  78.         o   The latest version of the software without the introductory
  79.             Shareware screen.
  80.  
  81.  
  82.         o   Free telephone (your Quarter) support for help with problems in
  83.             running BASIC Insight.  In addition, you may make suggestions on how
  84.             to improve the program.  You may also get support by writing to us
  85.             at the above address (this is the preferred method).
  86.  
  87.         o   A bound user's manual showing sample code (some with intentional
  88.             errors) and the output produced by BASIC Insight.
  89.  
  90.         o   Information on new versions of BASIC Insight as soon as they are
  91.             available.
  92.  
  93.         o   The source code for BASIC Insight (available to registered users for
  94.             an additional fee).
  95.  
  96.       The shareware philosophy is to pay smaller amounts for well-crafted and
  97.       useful software from developers who cannot spend the millions of dollars
  98.       on packaging and marketing necessary to compete with the large software
  99.       development companies. You benefit by being able to try (for free) a wider
  100.       variety of software products to find the ones that best suit your
  101.       particular purpose.  The shareware developer benefits from being able to
  102.       distribute his work to a wider audience than would be possible through
  103.       normal channels.  In order for Shareware to grow and prosper (with the
  104.       development of more and better products), it is your responsibility to
  105.       distribute your shareware programs to others and to become a registered
  106.       user of those products you like and use.
  107.  
  108.  
  109.                                1.0  Introduction
  110.  
  111.  
  112. BASIC Insight is a program designed to help with the documentation and debugging
  113. of BASIC programs.  The program is specifically designed for use with programs
  114. developed with Microsoft's QuickBASIC (tm) or Professional Development System
  115. (PDS) (tm).  It may also be used to process programs written with Visual BASIC,
  116. provided that the programs have been saved in text format.  BASIC Insight has
  117. been tested with programs written in IBM's BASICA and Microsoft's GW-BASIC and
  118. worked equally well with these programs.
  119.  
  120. The purpose of BASIC Insight is to provide the system developer with a formatted
  121. source listing and variable cross-reference for BASIC programs.  The formatted
  122. listing will show DO..LOOP and WHILE..WEND ranges, IF..THEN..ELSE..END IF true
  123. and false ranges, and the range of each CASE statement in a SELECT CASE group. 
  124. The listing will also display error messages if program loops are improperly
  125. nested.  The variable cross-reference will show the name of each variable or
  126. BASIC keyword in a subroutine (or the main module) and the line numbers where the
  127. variable is referenced.  Additionally, a global variable cross-reference is also
  128. available.  This shows the names of the subroutines which use each variable or
  129. BASIC keyword.  The program documentation along with its table of contents may
  130. be written either to a file or to the printer.
  131.  
  132. In addition to the listing described above, BASIC Insight is also capable of
  133. simultaneously producing an indented source listing.  This is simply a copy of
  134. the input program with all of the DO..LOOP, WHILE..WEND, IF..THEN..ELSE..END IF,
  135. and SELECT CASE structures indented for easier reading.  The indented source
  136. listing is a program file and can be used like any other program file you might
  137. create.
  138.  
  139.  
  140.  
  141.                               System Requirements
  142.  
  143. BASIC Insight will work on any IBM-compatible personal computer running MS-DOS
  144. or PC-DOS 3.30 (or higher) with at least 512K of available memory.  The program
  145. may be run from a floppy drive, but a hard drive is recommended, and may be
  146. essential, for the variable cross-reference due to the size of temporary files.
  147.  
  148. The program speed is, of course, dependent on processor speed, but does not seem
  149. to be dependent on processor type (i.e., 286 vs 386).  A program of about 2000
  150. lines can be processed in less than a minute without the cross-reference, and in
  151. about two minutes with the cross-reference running on a 20MHz 386 machine.
  152.  
  153.  
  154.  
  155.                                   What's New
  156.  
  157. Version 2.00 is a major re-write of BASIC Insight.  The features incorporated
  158. into the new version are:  1) menu operation (similar to QuickBASIC menus, 2)
  159. enhanced command line operation, 3) support for MAK files (lists of files to
  160. process) and INCLUDE files, 4) the ability to save and recall certain program
  161. configuration information (i.e., page layouts, page headers, etc.), 5) a user
  162. definable page header, 6) both local and global variable concordances (cross-
  163. references), 7) separation of variables and BASIC keywords, 8) indented source
  164. output, 9) documentation table of contents, 10) support for Visual BASIC
  165. programs, and 11) mouse support.
  166.  
  167.                           2.0  Running BASIC Insight
  168.  
  169.  
  170. You can run BASIC Insight in either a menu mode or a command line mode.  In
  171. either case, you start the program by typing BASDOC, followed by any command line
  172. options, at the DOS prompt and pressing <Enter>.  This assumes either that you
  173. are in the directory which contains BASIC Insight or that you have that directory
  174. specified in your PATH statement.  If this is not the case, you will need to
  175. specify the full path to the BASIC Insight executable file (i.e.,
  176. C:\BASDOC\BASDOC).
  177.  
  178. As stated, a number of the programs options can be specified from the command
  179. line using command line options.  Command line options are designated by a slash
  180. (/), followed by a letter, followed by the option data.  The command line option
  181. of /G causes the program to bypass the menus, run the analysis of the specified
  182. program, and return to the DOS prompt.  If the /G option is not specified, then
  183. any options entered will be used as the initial values in the menus.
  184.  
  185. In the following descriptions, each section will describe a menu option, and the
  186. equivalent command line option (if any) will be specified.  In addition, the
  187. command line options will be summarized in Appendix A.  The four main menu
  188. options (File, Options, Run, and Help) are described in Sections 2.1 through 2.4
  189. respectively.  In each menu section, the text will be referred to input
  190. structures such as an input box, list box, check box, and option box.  These
  191. input structures and how they are used will be described in Appendix B.
  192.  
  193. In either mode of operation, as BASIC Insight is running, information about the
  194. program being analyzed and the format of the output will be displayed on the
  195. screen in an information box as shown below:
  196.  
  197.  +===========================================================================+
  198.  |                                                                           |
  199.  | Input File: C:\BASIC\SAMPLE.BAS                                           |
  200.  | Output to: C:\BASIC\SAMPLE.LST                                            |
  201.  | MAK File?: No  Process INCLUDE Files?: No                                 |
  202.  | Create formatted source files?: Yes     Extension: SRC                    |
  203.  |                                                                           |
  204.  |  Local Concordance:   Variable: Yes    Keyword:No                         |
  205.  | Global Concordance:   Variable: Yes    Keyword:No                         |
  206.  |                                                                           |
  207.  | Line Length: 115      Lines per Page: 60                                  |
  208.  | Number of Characters to Indent: 3                                         |
  209.  | Page Header:                                                              |
  210.  | Date: \D     File: \F                   Page: \P                          |
  211.  | Version of BASIC: QB 4.5                                                  |
  212.  |                                                                           |
  213.  |                                                                           |
  214.  |                                                                           |
  215.  +===========================================================================+
  216.  
  217.  
  218.                                 2.1  File Menu
  219.  
  220. The File Menu (Figure 2.1) allows the user to 1) specify the input file, 2)
  221. identify the input file as a list of files to be processed, 3) specify the output
  222. device, 4) indicate that indented source files are to be created, 5) read a
  223. configuration file, 6) save a configuration file, or 7) exit the program.  The
  224. File Menu is accessed by pressing <Alt>-F (holding down the Alt key while
  225. pressing F) or by placing the mouse cursor over the word file and clicking the
  226. left button.  Once the menu is displayed, a selection may be made by pressing the
  227. highlighted letter, using the cursor keys to highlight the selection and pressing
  228. <Enter>, or placing the mouse cursor over the selection and clicking the left
  229. mouse button.  In Figure 2.1, the highlighted letter for each selection is shown
  230. in boldface type.
  231.                                                                         
  232. +========================= Figure 2.1  File Menu ======================+
  233. |                                                                      |
  234. |   File   Options   Run   Help                                        |
  235. | +--------------------+                                               |
  236. | | Input File         |                                               |
  237. | | MAK File           |                                               |
  238. | +--------------------+                                               |
  239. | | Output             |                                               |
  240. | | Indented Source    |                                               |
  241. | +--------------------+                                               |
  242. | | Read Configuration |                                               |
  243. | | Save Configuration |                                               |
  244. | +--------------------+                                               |
  245. | | Exit               |                                               |
  246. | +--------------------+                                               |
  247. |                                                                      |
  248. +======================================================================+
  249.  
  250.  
  251. 2.1.1  Input File
  252.  
  253. When the Input File option is selected from the menu, the user is prompted with
  254. an input box (shown in Figure 2.2) in which to enter a file specification.  The
  255. user may enter a complete file name (optionally including a file path), or may
  256. enter a file name containing wildcard characters (i.e., asterisk - *, or question
  257. mark - ?).  If a complete file name is entered, the program checks for the file's
  258. existence and notifies the user if the file is not found.  If wildcards are used,
  259. the user is presented with a list box containing file names (example in Figure
  260. 2.3) which match the file specification and the user may then choose a file from
  261. the list.  If the user selects <Cancel> from the list box, then a message is
  262. displayed reminding the user that no file was selected.
  263.  
  264. If the user does not specify a path in the input file description, then the
  265. default path for source files is used.  This path is specified in the File Paths
  266. menu option described in Section 2.2.3.  Once the input file has been specified,
  267. the name (along with the full path) is shown in the program information box.
  268.  
  269.  
  270. Command Line Option: /Finput file
  271.  
  272. When specifying the input file from the command line, the input file must be
  273. specified, must immediately follow the /F, and Wildcards may not be used.  Also,
  274. the path for the files is assumed to be the current directory if no path is
  275. specified.
  276.  
  277. +============== Figure 2.2  File Specification Input Box  =================+
  278. |                                                                          |
  279. |    +----------------------------------------------------------+          |
  280. |    |                                                          |          |
  281. |    |         Enter a file specification:                      |          |
  282. |    |      +-----------------------------------+               |          |
  283. |    |      |  *.*                              |               |          |
  284. |    |      +-----------------------------------+               |          |
  285. |    |                                                          |          |
  286. |    |                 < OK >                                   |          |
  287. |    |                                                          |          |
  288. |    |                                                          |          |
  289. |    +----------------------------------------------------------+          |
  290. |                                                                          |
  291. +==========================================================================+
  292.                                  
  293.                                  
  294. +================  Figure 2.3  File List Box  ==========================+
  295. |            +---------------------------+                              |
  296. |            |  +----------------+       |                              |
  297. |            |  |  SAMPLE1.BAS   |       |                              |
  298. |            |  |  SAMPLE1.EXE   ^       |                              |
  299. |            |  |  SAMPLE1.LST   *       |                              |
  300. |            |  |  SAMPLE1.OBJ   #       |                              |
  301. |            |  |  SAMPLE2.BAS   #       |                              |
  302. |            |  |  SAMPLE2.EXE   #       |                              |
  303. |            |  |  SAMPLE2.LST   #       |                              |
  304. |            |  |  SAMPLE2.OBJ   #       |                              |
  305. |            |  |  SAMPLE3.BAS   #       |                              |
  306. |            |  |  SAMPLE3.EXE   #       |                              |
  307. |            |  |  SAMPLE3.LST   #       |                              |
  308. |            |  |  SAMPLE3.OBJ   v       |                              |
  309. |            |  |  TEST.BAT      |       |                              |
  310. |            |  +----------------+       |                              |
  311. |            |                           |                              |
  312. |            |    < OK >     < Cancel >  |                              |
  313. |            |                           |                              |
  314. |            +---------------------------+                              |
  315. |                                                                       |
  316. +=======================================================================+
  317.  
  318.  
  319.  
  320.  
  321.                                 2.1.2  MAK File
  322.  
  323. This option specifies whether or not the file entered as the input file is in
  324. fact a list of files to be processed.  The list of files must be in ASCII format
  325. with one file per line.  On each line, the file name must be the first entry on
  326. the line and must be separated from any other information on the line by a space. 
  327. The status of the option is displayed in the information box, and is shown on the
  328. menu by the presence (if activated) or absence (not activated) of a » mark.
  329.  
  330. Command Line Option: /M
  331.  
  332.  
  333.  
  334. 2.1.3  Output
  335.  
  336. When the Output option is selected from the menu, an option box (Figure 2.4) is
  337. presented which allows the user to select None (for no documentation output),
  338. File (for output to a file), or Printer (for output to a print device).
  339.  
  340.       If None is selected, no documentation output is produced.  This option
  341.       would be selected if the user only wants to produce an indented source
  342.       file as described in Section 2.1.4.
  343.  
  344.       If File is selected, the user is prompted with an input box in which to
  345.       enter a file specification.  The user may enter a complete file name
  346.       (optionally including a file path), or may enter a file name containing
  347.       wildcard characters.  If a complete file name is entered, the program
  348.       checks for the file's existence and notifies the user if the file is
  349.       found, asking if it should be overwritten.  If wildcards are used, the
  350.       user is presented with a list of files which match the file specification
  351.       and the user may then choose a file from the list.  If the user does not
  352.       specify a path in the output file description, the default path for source
  353.       files is used.  This path is specified in the File Paths menu option
  354.       described in Section 2.2.3.  The input box and list box for the output
  355.       file are the same as those for the input files (Figures 2.2 and 2.3).
  356.  
  357.       If Printer is selected, the user is presented with a list box (Figure 2.5)
  358.       containing the print devices LPT1 - LPT4 and COM1 - COM4, and a selection
  359.       of the print device is made from the list.  Once the output device has
  360.       been specified, the information is displayed in the information box.
  361.  
  362. Command Line Option: /Ooutput
  363.  
  364. When specifying the output device from the command line, the user should either
  365. enter a complete file name (including the file path if necessary) or the name of
  366. a print device (i.e., LPT1 or COM1).  As with the input file, wildcards may not
  367. be entered from the command line.  If no output device is specified on the
  368. command line, then "None" is assumed.
  369.  
  370.  
  371. +======================  Figure 2.4  Output =============================+
  372. |                                                                        |
  373. |   +=================== Output Device Selection ==================+     |
  374. |   |                                                              |     |
  375. |   |                                                              |     |
  376. |   |                                                              |     |
  377. |   |         Output Devices for Documentation File                |     |
  378. |   |     (*) None    ( ) File       ( ) Printer                   |     |
  379. |   |           Output to:                                         |     |
  380. |   |                                                              |     |
  381. |   |                                                              |     |
  382. |   |                             < Cancel >                       |     |
  383. |   |                                                              |     |
  384. |   +==============================================================+     |
  385. |                                                                        |
  386. +========================================================================+
  387.  
  388.                                  
  389. +================  Figure 2.5  Printer List Box  =======================+
  390. |            +---------------------------+                              |
  391. |            |  +----------------+       |                              |
  392. |            |  |  LPT1          |       |                              |
  393. |            |  |  LPT2          ^       |                              |
  394. |            |  |  LPT3          *       |                              |
  395. |            |  |  LPT4          #       |                              |
  396. |            |  |  COM1          #       |                              |
  397. |            |  |  COM2          #       |                              |
  398. |            |  |  COM3          v       |                              |
  399. |            |  |  COM4          |       |                              |
  400. |            |  +----------------+       |                              |
  401. |            |                           |                              |
  402. |            |    < OK >     < Cancel >  |                              |
  403. |            |                           |                              |
  404. |            +---------------------------+                              |
  405. |                                                                       |
  406. +=======================================================================+
  407.  
  408.  
  409.  
  410.  
  411.                         2.1.4  Indented Source Listing
  412.  
  413. This option allows the user to generate indented source files.  These files are
  414. the same as the input program files except that command structures (such as DO
  415. loop, IF statements, CASE structures, etc.) are indented by a specified number
  416. of spaces.  This makes the source code itself easier to read, but does not affect
  417. the performance of the program.  It can still be edited and compiled like any
  418. other program file.  When the option is selected, an option box is presented
  419. asking if source files are to be created.  The user selects either the "Yes" or
  420. "No" button in the box.  The extension for the source file is specified in the
  421. File Paths menu option described in Section 2.2.3.  The default file extension
  422. is "SRC".
  423.  
  424. Command Line Option: /Sext
  425.  
  426. When specifying from the command line that source files are to be created, the
  427. file extension for the files must be specified.
  428.  
  429.  
  430.  
  431.                         2.1.5  Read Configuration File
  432.  
  433. When this option is selected, information about the analysis to be performed and
  434. the layout of the documentation is read in from a file.  The information includes
  435. whether local and/or global concordances (for variables or keywords) should be
  436. generated, the number of spaces to indent structures, the length of the output
  437. line, the number of lines per page, the page header, and the default language to
  438. use for keyword lookup.  The configuration file used in the menu options is
  439. always BASDOC.CFG and is found in the path designated in the File Paths menu
  440. option (Section 2.2.3).
  441.  
  442. Command Line Option: /Cfilename
  443.  
  444. When specifying the configuration file from the command line, the configuration
  445. file may have any file name.  It is recommended that the configuration file be
  446. placed prior to other format options on the command line, as the information in
  447. the file will override any format information already entered.
  448.  
  449. A sample configuration file and a description of how to create a file can be
  450. found in Appendix C.
  451.  
  452.  
  453.  
  454.                         2.1.6  Save Configuration File
  455.  
  456. When this option is selected, information about the analysis to be performed and
  457. the layout of the documentation is saved to a file.  The information includes
  458. whether local and/or global concordances should be generated, the number of
  459. spaces to indent structure, the length of the output line, the number of lines
  460. per page, the page header, and the default language to use for keyword lookup. 
  461. The configuration file name used is always BASDOC.CFG, and the file is output to
  462. the path designated in the File Paths menu option (Section 2.2.3).
  463.  
  464.  
  465.  
  466.  
  467.                                   2.1.7  Exit
  468.  
  469. Choosing this option terminates the program and returns the user to the DOS
  470. prompt.
  471.                                2.2  Options Menu
  472.  
  473. The Options Menu (Figure 2.6) allows the user to specify the output page format,
  474. the analysis options, and the file paths for various files used by BASIC Insight. 
  475. The Options Menu is accessed by pressing <Alt>-O (holding down the Alt key while
  476. pressing O) or by placing the mouse cursor over the word Options and clicking the
  477. left button.  Once the menu is displayed, a selection may be made by pressing the
  478. highlighted letter, using the cursor keys to highlight the selection and pressing
  479. <Enter>, or placing the mouse cursor over the selection and clicking the left
  480. mouse button.  In Figure 2.6, the highlighted letter for each selection is shown
  481. in boldface type.
  482.                                                                         
  483. +======================= Figure 2.6  Options Menu =====================+
  484. |                                                                      |
  485. |   File   Options   Run   Help                                        |
  486. |        +--------------------+                                        |
  487. |        | Page Layout        |                                        |
  488. |        | Processing Options |                                        |
  489. |        | File Paths         |                                        |
  490. |        +--------------------+                                        |
  491. |                                                                      |
  492. +======================================================================+
  493.  
  494.  
  495.  
  496.                               2.2.1  Page Layout
  497.  
  498. The Page Layout option allows the user to enter format information such as the
  499. number of spaces to indent structures, the number of characters per line, the
  500. number of lines per page, and the header to be printed at the top of each page. 
  501. When the Page Layout option is selected, the user is presented with the input box
  502. shown in Figure 2.7.  The shaded regions indicate edit fields where the user
  503. actually enters the information.  After filling out the information, the user may
  504. select <Accept> to use the entered data, or <Cancel> to return the format
  505. settings to their previous values.
  506.  
  507.  
  508. +=================  Figure 2.7  Page Layout Screen =======================+
  509. |                                                                         |
  510. |  +=================== Page Layout Options ==========================+   |
  511. |  |                                                                  |   |
  512. |  |   Number of Spaces to Indent:     4                              |   |
  513. |  |                                                                  |   |
  514. |  |   Number of Characters Per Line:  132                            |   |
  515. |  |                                                                  |   |
  516. |  |   Number of Lines Per Page:       55                             |   |
  517. |  |                                                                  |   |
  518. |  |   Page Header String:                                            |   |
  519. |  |   Date: \D   Time: \T   Filename: \N   Subroutine: \S   Page     |   |
  520. |  |                                                                  |   |
  521. |  |   < Accept >                                    < Cancel >       |   |
  522. |  |                                                                  |   |
  523. |  +==================================================================+   |
  524. +=========================================================================+
  525.  
  526.  
  527.  
  528.                            2.2.1.1  Spaces to Indent
  529.  
  530. This option specifies the number of spaces to indent each "nest" of DO loops,
  531. FOR..NEXT loops, etc.  This value controls the appearance of the formatted
  532. output.  Each statement within the range of a loop is shown with a loop
  533. descriptive character and the number of spaces requested by the user in front of
  534. it (as shown in the example below).  For indented source output files the effect
  535. is similar, but there are no line numbers or loop descriptive characters present.
  536.  
  537.       Program Segment:
  538.  
  539.       DO WHILE condition
  540.       statement 1
  541.       statement 2
  542.       statement 3
  543.       LOOP
  544.  
  545.       Formatted Listing (with 4 spaces selected):
  546.  
  547.       1     DO WHILE condition
  548.       2     L    statement 1
  549.       3     L    statement 2
  550.       4     L    statement 3
  551.       5     LOOP
  552.  
  553. In this example, the numbers to the far left are line numbers, and the "L" is the
  554. DO loop descriptive character.
  555.  
  556.  
  557.       Indented Source File (with 4 spaces selected):
  558.  
  559.       DO WHILE condition
  560.           statement 1
  561.           statement 2
  562.           statement 3
  563.       LOOP
  564.  
  565. The user can request any number of spaces (up to 10) for the indent function, but
  566. recommended values are from 1 to 5.
  567.  
  568. Command Line Option: /Nx
  569.  
  570. When entered from the command line, the user enters the number of space to indent
  571. (i.e., /N4).
  572.  
  573.  
  574.  
  575.                          2.2.1.2  Characters Per Line
  576.  
  577. This option specifies how many characters will be printed before BASIC Insight
  578. breaks the program statement into two or more output lines.  The length specified
  579. will be the number of characters on a line, including the line number, any
  580. indentations (see Section 2.2.1.1), and the program statement.  The user may
  581. input a value of 0, which will tell the program not to split the lines, or any
  582. integer value greater than 50.  The actual line length to be used will depend on
  583. the paper width and print font to be used to print the output file.  A value of
  584. 132 and a compressed font (17 cpi) for printing works well for most programs. 
  585. For indented source output, lines are never split and this value is ignored.
  586.  
  587. Command Line Option: /Lxxx
  588.  
  589. When entered from the command line, the user enters the number of characters per
  590. line (i.e., /L132).
  591.  
  592.  
  593.  
  594.                             2.2.1.3  Lines Per Page
  595.  
  596. This option specifies the number of lines to be printed per page when the file
  597. is sent to a printer.  The program will issue a form feed character each time the
  598. "lines per page" counter exceeds the input value.  The program will also issue
  599. a form feed each time a new subroutine or function is encountered.  The lines
  600. printed on a page also includes the three-line report header which is printed at
  601. the top of each page.  While most printers can print up to sixty-six lines per
  602. page (some can print more), a value of 55 lines per page seems to work well for
  603. most printer setups.
  604.  
  605. Command Line Option:  /Pxx
  606.  
  607. From the command line, the user enters the number of lines per page (i.e., /P55).
  608.  
  609.  
  610.  
  611.                              2.2.1.4  Page Header
  612.  
  613. This option specifies the page header (single line) to be printed at the top of
  614. each page of the output report.  The page header can be as long as the line
  615. length specified in Section 2.2.1.2, and can contain any descriptive text the
  616. user wants to include.  In addition, the user may include backslash (\) operators
  617. in the text to have program-dependent data printed in the header.  These
  618. operators take the form of \A, where "A" is one of the following five
  619. descriptors:
  620.  
  621.       D -   The date that the report was run.  This is pulled from the system
  622.             date function.
  623.       T -   The time that the run started.  This is pulled from the system time
  624.             function.
  625.       N -   The name of the file being processed.  This can be useful when
  626.             processing a MAK file, as the program will use the names of the
  627.             files being analyzed to show which routines are part of which file.
  628.       S -   The current subroutine being processed.  This is taken from the SUB
  629.             or FUNCTION statement at the beginning of each routine.  For the
  630.             first routine (which is unnamed), the default name of "Main" is used
  631.             for all programs except Visual BASIC programs where the default name
  632.             is "Declarations".
  633.       P -   The current page number.
  634.  
  635. When entering this data in the edit field, up to 132 characters will be accepted
  636. as input, but only 60 characters will be displayed at a time.
  637.  
  638. Command Line Option: /Hpage_header_information
  639.  
  640. When entering the page header data from the command line, an underscore (_) must
  641. be used to indicate each space in the header string.  This is required since the
  642. module which processes the command line options looks for spaces to separate the
  643. different options.  Each underscore will be converted to a space prior to
  644. printing the page header.
  645.  
  646.  
  647.  
  648.                            2.2.2  Processing Options
  649.  
  650. The Processing Options choice allows the user to make choices about the type of
  651. concordances (local or global cross-references of variables and/or keywords) to
  652. have printed, the language used by the program being analyzed (this is to
  653. determine the keyword set to be used), and whether or not to process INCLUDE
  654. files.  The user is presented with an input panel (Figure 2.8) which contains a
  655. series of check boxes, a set of radio buttons for choosing the language, and
  656. command buttons for processing the input.  After making selections of processing
  657. options, the user may select <Accept> to use the selected choices, or <Cancel>
  658. to return the processing options to their previous settings.
  659.  
  660.  
  661. +=================  Figure 2.8  Processing Options Screen  ===============+
  662. |                                                                         |
  663. | +===================== File Processing Options =====================+   |
  664. | |                                                                   |   |
  665. | |  Local Concordances:            Global Concordances:              |   |
  666. | |  [X] Variables                  [X] Variables                     |   |
  667. | |  [ ] Keywords                   [ ] Keywords                      |   |
  668. | |                                                                   |   |
  669. | |  [ ] Process INCLUDE Files                                        |   |
  670. | |                                                                   |   |
  671. | |      Language to use for Keywords                                 |   |
  672. | |  (*) None     ( ) PDS 7.1     ( ) QB 4.5     ( ) VB               |   |
  673. | |                                                                   |   |
  674. | |  < Accept >                                  < Cancel >           |   |
  675. | |                                                                   |   |
  676. | +===================================================================+   |
  677. +=========================================================================+
  678.  
  679.  
  680.                         2.2.2.1  Variable Concordances
  681.  
  682. A variable concordance is a listing of the variables used in a subroutine or a
  683. program along with information about where they are used.  A local variable
  684. concordance may be printed at the end of each subroutine, and lists the variables
  685. used in that subroutine and the line numbers on which they appear.  This is often
  686. useful in discovering typographical errors, or in determining where the value of
  687. a variable has been redefined.  To select local variable concordance from the
  688. input panel, mark the Variables check box under Local Concordances.  A global
  689. variable concordance may be printed at the end of the program, and lists all the
  690. variables used in the program and the subroutines in which they appear.  This is
  691. useful in helping to determine what effect (if any) changing the value of a
  692. variable in one subroutine will have on another subroutine.  To select global
  693. variable concordance from the input panel, mark the Variables check box under
  694. Global Concordances.
  695.  
  696. Command Line Option: /Va
  697.  
  698. From the command line, the letter following the /V determines the type of
  699. variable concordance to be printed.  For a local concordance, enter L; for a
  700. global concordance, enter G; or to have both local and global concordances
  701. printed, enter B.
  702.  
  703.  
  704.  
  705.                          2.2.2.2  Keyword Concordances
  706.  
  707. A keyword concordance is a listing of the keywords used in a subroutine or a
  708. program along with information about where they are used.  A keyword concordance
  709. is most useful in determining the effect of a version change of a language when
  710. the operation or syntax of a command might have changed.  It is also very useful
  711. when porting code from one flavor of BASIC to another (i.e., QuickBASIC to Visual
  712. BASIC), or to another language, to determine what commands or functions are
  713.  
  714. required by a program that might not be present in the new language.  A local
  715. keyword concordance may be printed at the end of each subroutine, and lists the
  716. keywords used in that subroutine and the line numbers on which they appear.  To
  717. select local keyword concordance from the input panel, mark the Keywords check
  718. box under Local Concordances.  A global keyword concordance may be printed at the
  719. end of the program, and lists all the keywords used in the program and the
  720. subroutines in which they appear.  To select global keyword concordance from the
  721. input panel, mark the Keywords check box under Global Concordances.
  722.  
  723. Command Line Option: /Ka
  724.  
  725. From the command line, the letter following the /K determines the type of keyword
  726. concordance to be printed.  For a local concordance, enter L; for a global
  727. concordance, enter G; or to have both local and global concordances printed,
  728. enter B.
  729.  
  730.  
  731.  
  732.                             2.2.2.3  INCLUDE Files
  733.  
  734. INCLUDE files are small segments of BASIC code which provide subroutine
  735. declarations, definitions of constants, TYPE declarations, COMMON blocks, and
  736. array or variable dimensions.  These files are most often used in conjunction
  737. with libraries such as interface, graphics, or financial functions, but may also
  738. be used if you have certain code pieces that you use in several of your programs. 
  739. When this option is invoked, BASIC Insight will process INCLUDE files as it
  740. encounters them, provided that the file is found.  When INCLUDE files are
  741. processed, their statements are preceded by "## " prior to any other indent
  742. characters.  This helps set them off from the rest of your code.  To select
  743. INCLUDE file processing from the input box, mark the check box for "Process
  744. INCLUDE Files".
  745.  
  746. Command Line Option: /I
  747.  
  748. When selecting INCLUDE file processing from the command line, enter the /I
  749. option.  There are no additional characters required.
  750.  
  751.  
  752.  
  753.                          2.2.2.4  Programming Language
  754.  
  755. The purpose of selecting the programming language used is to determine the
  756. keyword set to be used in the processing of the variable and keyword
  757. concordances.  If no language is selected, BASIC Insight treats both variables
  758. and keywords the same, and processes them as variables in the concordances.  Also
  759. no keyword concordance is possible.  The other reason for specifying the language
  760. is that the untitled routine at the beginning of a PDS 7.1 or QB 4.5 program file
  761. is considered the "Main" routine.  For Visual BASIC, this is considered the
  762. declarations area.  BASIC Insight uses the language specification to assign the
  763. appropriate title to the first routine.  To select the language from the input
  764. box, mark the space in front of the appropriate language.
  765.  
  766.  
  767. Command Line Option: /Bn
  768.  
  769. To select the programming language from the command line, the number following
  770. the /B option is defined as follows:  1 for PDS 7.1, 2 for QB 4.5, and 3 for
  771. Visual BASIC.
  772.  
  773. NOTE:  If you are using BASIC Insight with a language other than one of the three
  774. that are specifically supported, a custom version of the code tailored for that
  775. language can be provided for you (for a small fee) if you will provide us with
  776. the keyword list.
  777.  
  778.  
  779.  
  780.                         2.2.3  File Path Specification
  781.  
  782. The File Path option allows the user to enter path information for files used by
  783. BASIC Insight.  These are the configuration files, keyword files, help files, and
  784. source program files.  The default value for the path for configuration, keyword,
  785. and help files is the subdirectory where the BASIC Insight executable file is
  786. located.  The default for the source program files is the current directory.  The
  787. user may also enter the file extension to be used for indented source output
  788. files.  The default extension is SRC.  When the File Path option is selected, the
  789. user is presented with the input box shown in Figure 2.9.  The shaded regions
  790. indicate edit fields where the user actually enters the information.  After
  791. filling out the information, the user may select <Accept> to use the entered
  792. data, or <Cancel> to return the path settings to their previous values.
  793.  
  794. +===================  Figure 2.9  File Path Input Screen  ==================+
  795. |                                                                           |
  796. | +========================== Path Definitions ==========================+  |
  797. | |                                                                      |  |
  798. | |    Path for Configuration File:                                      |  |
  799. | |    C:\BASDOC\                                                        |  |
  800. | |                                                                      |  |
  801. | |    Path for Keyword Files:                                           |  |
  802. | |    C:\BASDOC\                                                        |  |
  803. | |                                                                      |  |
  804. | |    Path for Help Files:                                              |  |
  805. | |    C:\BASDOC\                                                        |  |
  806. | |                                                                      |  |
  807. | |    Path for Source Code Files:                                       |  |
  808. | |    C:\SAMPLES\                                                       |  |
  809. | |                                                                      |  |
  810. | |    Extension for Output Source Files:                                |  |
  811. | |    SRC                                                               |  |
  812. | |                                                                      |  |
  813. | |    < Accept >                                      < Cancel >        |  |
  814. | |                                                                      |  |
  815. | +======================================================================+  |
  816. +===========================================================================+
  817.                                  2.3  Run Menu
  818.  
  819. The Run Menu (Figure 2.10) allows the user to start the processing of the BASIC
  820. programs to be analyzed, using the currently defined options.  The Run Menu is
  821. accessed by pressing <Alt>-R (holding down the Alt key while pressing R) or by
  822. placing the mouse cursor over the word Run and clicking the left button.  You
  823. begin processing the file by pressing the highlighted letter (P), simply pressing
  824. <Enter>, or placing the mouse cursor over the selection and clicking the left
  825. mouse button.
  826.                                                                         
  827. +========================= Figure 2.10 Run Menu =======================+
  828. |                                                                      |
  829. |   File   Options   Run   Help                                        |
  830. |                  +-----------------+                                 |
  831. |                  | Process File(s) |                                 |
  832. |                  +-----------------+                                 |
  833. |                                                                      |
  834. |                                                                      |
  835. |                                                                      |
  836. +======================================================================+
  837.  
  838.  
  839.  
  840.                             2.3.1  Process File(s)
  841.  
  842. Selecting this menu item starts the processing of BASIC programs.  To show the
  843. progress of the analysis, the program keeps a running count of the line number
  844. being processed as shown in Figure 2.11.  At the end of each routine, the program
  845. will perform (if requested) the local variable and keyword concordance.  While
  846. this is being done, the program displays the variables being processed as shown
  847. in Figure 2.12.  A similar process occurs at the end of the program if a global
  848. variable/keyword concordance has been requested.  After the analysis is
  849. completed, an alert box is displayed (Figure 2.13) that informs the user of the
  850. completion of the run.  Pressing <Enter> or clicking the <OK> button will return
  851. the user to the menu.
  852.  
  853. Command Line Option: /G
  854.  
  855. When the command option /G is input on the command line, the menu is bypassed,
  856. and processing begins immediately using the files and options specified on the
  857. command line.  When processing is completed, the program returns to the DOS
  858. prompt.  The main use of this option is to allow the building of a batch file to
  859. process several different programs at once.
  860.  
  861.  
  862. +=================  Figure 2.11  Line Count Display  =====================+
  863. |                                                                         |
  864. |             +----------------------------------------------+            |
  865. |             |                                              |            |
  866. |             |       Processing line number:  50            |            |
  867. |             |                                              |            |
  868. |             |                                              |            |
  869. |             |                                              |            |
  870. |             |                                              |            |
  871. |             |                                              |            |
  872. |             +----------------------------------------------+            |
  873. |                                                                         |
  874. +=========================================================================+
  875.  
  876.  
  877. +============  Figure 2.12  Variable Processing Display  =================+
  878. |                                                                         |
  879. |             +----------------------------------------------+            |
  880. |             |                                              |            |
  881. |             |       Processing line number:  183           |            |
  882. |             |                                              |            |
  883. |             |                                              |            |
  884. |             |                                              |            |
  885. |             |                                              |            |
  886. |   +---------+----------------------------------------------+--------+   |
  887. |   |                Printing Variable Cross-Reference                |   |
  888. |   |                      for Subroutine:   Main                     |   |
  889. |   |                                                                 |   |
  890. |   |                 lpix                                            |   |
  891. |   |                                                                 |   |
  892. |   |                                                                 |   |
  893. |   +-----------------------------------------------------------------+   |
  894. |                                                                         |
  895. +=========================================================================+
  896.  
  897.  
  898. +===============  Figure 2.13  Analysis Completion Screen ================+
  899. |                                                                         |
  900. |                                                                         |
  901. |              +---------------------------------------------+            |
  902. |              |  Processing Completed                       |            |
  903. |              |                                             |            |
  904. |              |                                             |            |
  905. |              |                                             |            |
  906. |              +---------------------------------------------+            |
  907. |              |                    < OK >                   |            |
  908. |              +---------------------------------------------+            |
  909. |                                                                         |
  910. |                                                                         |
  911. +=========================================================================+
  912.  
  913.  
  914.                                 2.4  Help Menu
  915.  
  916. The Help Menu (Figure 2.14) allows the user to access on-line help about the
  917. settings of BASIC Insight and about the function of the program.  The Help Menu
  918. is accessed by pressing <Alt>-H (holding down the Alt key while pressing H) or
  919. by placing the mouse cursor over the word Help and clicking the left button. 
  920. Once the menu is displayed, a selection may be made by pressing the highlighted
  921. letter, using the cursor keys to highlight the selection and pressing <Enter>,
  922. or placing the mouse cursor over the selection and clicking the left mouse
  923. button.  In Figure 2.14, the highlighted letter for each selection is shown in
  924. boldface type.
  925.                                                                         
  926. +======================== Figure 2.14 Help Menu =======================+
  927. |                                                                      |
  928. |   File   Options   Run   Help                                        |
  929. |                        +--------------------+                        |
  930. |                        | Index              |                        |
  931. |                        | About This Program |                        |
  932. |                        +--------------------+                        |
  933. |                                                                      |
  934. |                                                                      |
  935. +======================================================================+
  936.  
  937.  
  938.  
  939.                                  2.4.1  Index
  940.  
  941. When the Index option is selected, a list box showing the help topics (Figure
  942. 2.15) is displayed.  The user may then select a help topic by highlighting the
  943. topic and selecting the <OK> button, or return to the menu by selecting the
  944. <Cancel> button.  When a topic is selected, information about the topic is
  945. displayed in a window as shown in Figure 2.16.  Selecting the <OK> button from
  946. the help topic screen returns the user to the help index.
  947.                                  
  948.  
  949. +================  Figure 2.15  Help Index Box =========================+
  950. |            +---------------------------+                              |
  951. |            |  +-----------------+      |                              |
  952. |            |  | About Box       |      |                              |
  953. |            |  | Characters Per  ^      |                              |
  954. |            |  | File Menu       *      |                              |
  955. |            |  | File Path Def   #      |                              |
  956. |            |  | Help Index      #      |                              |
  957. |            |  | Help Menu       #      |                              |
  958. |            |  | INCLUDE Files   #      |                              |
  959. |            |  | Indented Source #      |                              |
  960. |            |  | Input File      #      |                              |
  961. |            |  | Keyword Concord #      |                              |
  962. |            |  | Lines Per Page  v      |                              |
  963. |            |  | MAK File        |      |                              |
  964. |            |  +-----------------+      |                              |
  965. |            |                           |                              |
  966. |            |    < OK >   < Cancel >    |                              |
  967. |            |                           |                              |
  968. |            +---------------------------+                              |
  969. |                                                                       |
  970. +=======================================================================+
  971.  
  972.  
  973.  
  974.                                                                              
  975. +==================  Figure 2.16  Help Window  ==============================+
  976. |                                                                            |
  977. | +------------------------------------------------------------------------+ |
  978. | | Characters Per Line:                                                   | |
  979. | | This option specifies how many characters will be printed before the   | |
  980. | | BASIC Insight breaks the program statement into two or more output     | |
  981. | | lines.  The length specified will be the number of characters on a     | |
  982. | | line, including the line number, any indentations (see Spaces to       | |
  983. | | Indent), and the program statement.  The user may input a value of 0,  | |
  984. | | which will tell the program not to split the lines, or any integer     | |
  985. | | value greater than 50.  The actual line length to be used will depend  | |
  986. | | on the paper width and print font to be used to print the output file. | |
  987. | | For my own work, I use a value of 132 and a compressed (17 cpi) font   | |
  988. | | for printing.  For indented source output, lines are never split and   | |
  989. | | this value is ignored.                                                 | |
  990. | |                                                                        | |
  991. | |                                                                        | |
  992. | |                                                                        | |
  993. | +------------------------------------------------------------------------+ |
  994. | |                            < OK >                                      | |
  995. | +------------------------------------------------------------------------+ |
  996. |                                                                            |
  997. +============================================================================+
  998.  
  999.  
  1000.  
  1001.  
  1002.                            2.4.2  About This Program
  1003.     
  1004. This option displays a window (like the help window in Figure 2.16) that contains
  1005. a general description of the program.  Selecting the <OK> button returns the user
  1006. to the main menu.
  1007.  
  1008.  
  1009.                            2.4.3  Command Line Help
  1010.  
  1011. Command Line Option: /?
  1012.  
  1013. When this option is entered on the command line, the program prints out to the
  1014. screen a listing of the command line options, including a brief description of
  1015. each.
  1016.  
  1017.                                3.0  Enhancements
  1018.  
  1019.  
  1020. Future versions of BASIC Insight may be developed and released to enhance the
  1021. capabilities of the current program.  Below is a list of possible program
  1022. enhancements for later versions.  Input from registered users will help determine
  1023. the priority in which these get implemented.  Additional suggestions from users
  1024. may also be included.  Enhanced versions of the program will be available to all
  1025. registered users for about $10.  This covers the cost of postage and of new disks
  1026. and manuals.
  1027.  
  1028. Possible enhancements:
  1029.  
  1030.   o   Output directed to screen.
  1031.  
  1032.   o   Tree structure showing subroutine calls.
  1033.  
  1034.  
  1035.                    Appendix A:  Command Line Options Summary
  1036.  
  1037.  
  1038. In the following text, the optional parameters that may be entered on the command
  1039. line will be described.  Each option is preceded by a slash (/), is identified
  1040. by a single letter option designator (shown in boldface type), and is immediately
  1041. followed by the required input (shown in italics).  In addition to the
  1042. description of the command, the default values for each option will be listed.
  1043.  
  1044. /Finput_file      This option specifies the BASIC program source file to be
  1045.                   processed.  The user must enter the complete filename of the
  1046.                   program source or MAK file.  The user may optionally enter the
  1047.                   file path for the file, but if the path is omitted, the
  1048.                   current directory will be assumed.  Wildcard characters (* or
  1049.                   ?) are not permitted in the input file name.  Default: None.
  1050.  
  1051. /M                This option indicates that the file specified by the input
  1052.                   file option is actually a list of files to be processed.  For
  1053.                   each file in the list, the path must either be specified in
  1054.                   the MAK file, or the file must reside in the current
  1055.                   directory.  Default:  None.
  1056.  
  1057. /Ooutput          This option specifies the output file or device to be used for
  1058.                   the documentation output.  If a file is to be used, the user
  1059.                   must specify a complete file name (wildcards are not allowed),
  1060.                   optionally including the file path.  If the path is not
  1061.                   specified, the current directory is assumed.  If a print
  1062.                   device is to be used, the user must specify the device name
  1063.                   (i.e., LPT1, LPT2, COM1, etc.).  Default:  No output.
  1064.  
  1065. /Cconfig_file     This option specifies the name of a configuration file to be
  1066.                   read.  This file (defined in Appendix C) contains page format
  1067.                   and file processing options to be used in running BASIC
  1068.                   Insight.  Keeping these values in a configuration file
  1069.                   relieves the user from entering the information for each file
  1070.                   to be processed.  The user must enter the complete name of the
  1071.                   file (no wildcards), and if the path is not specified, the
  1072.                   directory containing the file is assumed to be the same one
  1073.                   which contains the BASIC Insight executable file (BASDOC.EXE). 
  1074.                   Default:  None.
  1075.  
  1076. /I                This option specifies that INCLUDE files should also be
  1077.                   processed.  Default: None.
  1078.  
  1079. /N#               This option specifies the number of spaces (up to 10) to
  1080.                   indent command structures.  Default: 3.
  1081.  
  1082.  
  1083. /L###             This option specifies the number of characters to print on
  1084.                   each line.  BASIC Insight will break command lines at the end
  1085.                   of the number of characters specified in order to make the
  1086.                   output fit properly on the page.  If a value of 0 is entered,
  1087.                   then lines are not broken.  For indented source output files,
  1088.                   command lines are never broken and this option is ignored. 
  1089.                   Default:  80.
  1090.  
  1091. /P##              This option specifies the number of lines to be printed on
  1092.                   each page of the documentation output.  Default: 60.
  1093.  
  1094. /Hpage_header     This option specifies the page header (single line) to be
  1095.                   printed at the top of each page of the output report.  The
  1096.                   page header can be as long as the line length specified above,
  1097.                   and can contain any descriptive text the user wants to
  1098.                   include.  In addition, the user may include backslash (\)
  1099.                   operators in the text to have program-dependent data printed
  1100.                   in the header.  These operators take the form of \A, where "A"
  1101.                   is one of the following five descriptors:
  1102.  
  1103.                   D -   The date that the report was run.  This is pulled from
  1104.                         the system date function.
  1105.                   T -   The time that the run started.  This is pulled from the
  1106.                         system time function.
  1107.                   N -   The name of the file being processed.  This can be
  1108.                         useful when processing a MAK file, as the program will
  1109.                         use the names of the files being analyzed to show which
  1110.                         routines are part of which file.
  1111.                   S -   The current subroutine being processed.  This is taken
  1112.                         from the SUB or FUNCTION statement at the beginning of
  1113.                         each routine.  For the first routine (which is unnamed),
  1114.                         the default name of "Main" is used for all programs
  1115.                         except Visual BASIC programs where the default name is
  1116.                         "Declarations".
  1117.                   P -   The current page number.
  1118.  
  1119.                   When entering the page header data from the command line, an
  1120.                   underscore (_) must be used to indicate each space in the
  1121.                   header string.  This is required since the module which
  1122.                   processes the command line options looks for spaces to
  1123.                   separate the different options.  Each underscore will be
  1124.                   converted to a space prior to printing the page header. 
  1125.                   Default: None.
  1126.  
  1127. /Va               This option specifies the type of variable concordance(s) to
  1128.                   be printed.  The values of a are as follows:  L for local
  1129.                   concordance, G for global concordance, or B for both
  1130.                   concordances.  Default: None.
  1131.  
  1132.  
  1133. /Ka               This option specifies the type of keyword concordance(s) to be
  1134.                   printed.  The values of a are as follows:  L for local
  1135.                   concordance, G for global concordance, or B for both
  1136.                   concordances.  Default: None.
  1137.  
  1138. /B#               This option specifies the programming language used in the
  1139.                   source file.  This information is used to access a database of
  1140.                   keywords so that BASIC Insight can distinguish between
  1141.                   variables and keywords when generating the concordances.  The
  1142.                   values of # for supported versions of BASIC are:  1 for
  1143.                   Professional BASIC (PDS), 2 for QuickBASIC, or 3 for Visual
  1144.                   BASIC.  Any other value entered is ignored, and no language is
  1145.                   assumed.  Default: 0 (no language).
  1146.  
  1147. /Sext             This option specifies that BASIC Insight should create
  1148.                   indented source files using ext as the output file extension. 
  1149.                   Default: SRC.
  1150.  
  1151. /G                This options tells BASIC Insight to run the analysis using the
  1152.                   information specified on the command line (without accessing
  1153.                   the menu), and return to DOS upon completion.  Default:  No
  1154.                   additional parameters.
  1155.  
  1156.                      Appendix B:  Use of Data Input Forms
  1157.  
  1158.  
  1159. BASIC Insight makes use of several user interface methods to make it easier to
  1160. move around the program and enter necessary data.  These methods are pull-down
  1161. menus, input boxes, edit fields, check boxes, list boxes, radio button option
  1162. choices, and command buttons.  In this section, techniques for using these
  1163. methods with either the keyboard or the mouse will be presented.
  1164.  
  1165. Pull-down Menus
  1166.  
  1167. BASIC Insight uses a pull-down menu for the main menu of the program.  The menu
  1168. appears as a bar across the top of the screen, and as the main menu options are
  1169. selected, the sub-menu drops down below the menu bar.  To access the main menu
  1170. options, the user may press the <Alt> key followed by one of the highlighted
  1171. letters on the menu bar (for example, Alt-F for the File Menu).  Once the main
  1172. menu has been activated, the user may move between main menu options using the
  1173. left and right cursor keys.  To select a sub-menu option using the keyboard, the
  1174. user may either press the highlighted letter of the menu option, or use the up
  1175. and down cursor keys to move the light bar to the option then pressing <Enter>.
  1176.  
  1177. To select a main menu choice using the mouse, the user places the mouse cursor
  1178. over the option name and clicks the left mouse button.  To select a sub-menu
  1179. option, the user again moves the mouse cursor over the option and clicks the left
  1180. mouse button.  Figure B.1 shows an example of the pull-down menus.
  1181.                                                                         
  1182. +======================= Figure B.1  Pull-Down Menu ===================+
  1183. |                                                                      |
  1184. |   File   Options   Run   Help                                        |
  1185. | +--------------------+                                               |
  1186. | | Input File         |                                               |
  1187. | | MAK File           |                                               |
  1188. | +--------------------+                                               |
  1189. | | Output             |                                               |
  1190. | | Indented Source    |                                               |
  1191. | +--------------------+                                               |
  1192. | | Read Configuration |                                               |
  1193. | | Save Configuration |                                               |
  1194. | +--------------------+                                               |
  1195. | | Exit               |                                               |
  1196. | +--------------------+                                               |
  1197. |                                                                      |
  1198. +======================================================================+
  1199.  
  1200. Input Boxes
  1201.  
  1202. An input box is used to get a single piece of information from the user.  Once
  1203. it has been activated by the program, the user enters the required data in the
  1204. input area, then presses <Enter> or clicks the mouse on the <OK> command button
  1205. to accept the entered information and continue the program.  Figure B.2 shows an
  1206. example of an input box.
  1207.  
  1208.  
  1209. +======================  Figure B.2  Input Box  ===========================+
  1210. |                                                                          |
  1211. |    +----------------------------------------------------------+          |
  1212. |    |                                                          |          |
  1213. |    |         Enter a file specification:                      |          |
  1214. |    |      +-----------------------------------+               |          |
  1215. |    |      |  *.*                              |               |          |
  1216. |    |      +-----------------------------------+               |          |
  1217. |    |                                                          |          |
  1218. |    |                 < OK >                                   |          |
  1219. |    |                                                          |          |
  1220. |    |                                                          |          |
  1221. |    +----------------------------------------------------------+          |
  1222. |                                                                          |
  1223. +==========================================================================+
  1224.  
  1225. Edit Fields
  1226.  
  1227. Edit fields are used in groups on an input screen to obtain multiple pieces of
  1228. information from the user, usually about a related subject (i.e., page format
  1229. options).  Each edit field is preceded by a data description and has a
  1230. highlighted area for actual data input.  The user may move between edit fields
  1231. using the <Tab> and <Shift><Tab> keys, or by clicking on the field with the
  1232. mouse.  In each edit field, the user enters the required information using the
  1233. keyboard.  In BASIC Insight, the screens which use edit fields will also have an
  1234. <Accept> and a <Cancel> command button.  These buttons are described below, and
  1235. are used to determine whether variables in the program are set to the newly
  1236. entered values (Accept), or reset to their previous values (Cancel).  Using
  1237. either of these buttons will terminate the particular input screen.  Figure B.3
  1238. shows an example of a screen with several edit fields.
  1239.  
  1240. +=================  Figure B.3  Edit Field Example =======================+
  1241. |                                                                         |
  1242. |  +=================== Page Layout Options ==========================+   |
  1243. |  |                                                                  |   |
  1244. |  |   Number of Spaces to Indent:     4                              |   |
  1245. |  |                                                                  |   |
  1246. |  |   Number of Characters Per Line:  132                            |   |
  1247. |  |                                                                  |   |
  1248. |  |   Number of Lines Per Page:       55                             |   |
  1249. |  |                                                                  |   |
  1250. |  |   Page Header String:                                            |   |
  1251. |  |   Date: \D   Time: \T   Filename: \N   Subroutine: \S   Page     |   |
  1252. |  |                                                                  |   |
  1253. |  |   < Accept >                                    < Cancel >       |   |
  1254. |  |                                                                  |   |
  1255. |  +==================================================================+   |
  1256. +=========================================================================+
  1257.  
  1258.  
  1259. Check Boxes
  1260.  
  1261. Check boxes are used on an input screen to indicate options that are either on
  1262. or off.  Each check box consists of a pair of square brackets, [], and a
  1263. description of the option.  If the option is on, an "X" appears in the box
  1264. between the brackets.  To toggle a check box using the keyboard, the user moves
  1265. the cursor to the check box using the <Tab> or <Shift><Tab> keys, then presses
  1266. the <Space> bar to toggle the option.  Using the mouse, the user toggles the
  1267. check box value by clicking the left mouse key with the mouse cursor placed over
  1268. the check box.  Like edit field input screens, command buttons will be used on
  1269. the screen with check boxes to process the options.  Figure B.4 shows examples
  1270. of check boxes and radio buttons (described below).
  1271.  
  1272. +=============  Figure B.4  Check Box and Radio Button Example ===========+
  1273. |                                                                         |
  1274. | +===================== File Processing Options =====================+   |
  1275. | |                                                                   |   |
  1276. | |  Local Concordances:            Global Concordances:              |   |
  1277. | |  [X] Variables                  [X] Variables                     |   |
  1278. | |  [ ] Keywords                   [ ] Keywords                      |   |
  1279. | |                                                                   |   |
  1280. | |  [ ] Process INCLUDE Files                                        |   |
  1281. | |                                                                   |   |
  1282. | |      Language to use for Keywords                                 |   |
  1283. | |  (*) None     ( ) PDS 7.1     ( ) QB 4.5     ( ) VB               |   |
  1284. | |                                                                   |   |
  1285. | |  < Accept >                                  < Cancel >           |   |
  1286. | |                                                                   |   |
  1287. | +===================================================================+   |
  1288. +=========================================================================+
  1289.  
  1290. List Boxes
  1291.  
  1292. A list box is used to allow the user to make a selection among a series of
  1293. choices, such as a file list.  To make a selection using the keyboard, the user
  1294. moves the cursor to the list area using the <Tab> keys, then uses the up and down
  1295. cursor and <Page Up> and <Page Down> keys to highlight the selection.  The user
  1296. may then press <Enter> to accept the selection.  Using the mouse, the user may
  1297. click on the selection in the list to highlight it, or may click on the scroll
  1298. bar (the shaded area to the right of the choices) to move through the list. 
  1299. Clicking on one of the arrows on the scroll bar moves the highlight bar one
  1300. selection at a time, while clicking on the shaded area above or below the solid
  1301. block moves the highlight bar one page of selections at a time.  Once the
  1302. selection is highlighted, the user clicks on the <OK> button to accept the
  1303. selection, or on the <Cancel> button to exit the list box without making a
  1304. selection.  Figure B.5 shows an example of a list box.
  1305.  
  1306.  
  1307. +================  Figure B.5  List Box Example ========================+
  1308. |            +---------------------------+                              |
  1309. |            |  +-----------------+      |                              |
  1310. |            |  | About Box       |      |                              |
  1311. |            |  | Characters Per  ^      |                              |
  1312. |            |  | File Menu       *      |                              |
  1313. |            |  | File Path Def   #      |                              |
  1314. |            |  | Help Index      #      |                              |
  1315. |            |  | Help Menu       #      |                              |
  1316. |            |  | INCLUDE Files   #      |                              |
  1317. |            |  | Indented Source #      |                              |
  1318. |            |  | Input File      #      |                              |
  1319. |            |  | Keyword Concord #      |                              |
  1320. |            |  | Lines Per Page  v      |                              |
  1321. |            |  | MAK File        |      |                              |
  1322. |            |  +-----------------+      |                              |
  1323. |            |                           |                              |
  1324. |            |    < OK >   < Cancel >    |                              |
  1325. |            |                           |                              |
  1326. |            +---------------------------+                              |
  1327. |                                                                       |
  1328. +=======================================================================+
  1329.  
  1330. Radio Buttons
  1331.  
  1332. Radio buttons are used to allow the user to choose one of several available
  1333. choices.  Radio buttons consist of a pair of parentheses along with a description
  1334. of the choice.  The currently selected option has a diamond in the parentheses. 
  1335. To select a radio button using the keyboard, the user moves the cursor to the
  1336. radio button using the <Tab> or <Shift><Tab> keys, then presses the <Space> bar
  1337. to select the option.  Using the mouse, the user selects the radio button by
  1338. clicking the left mouse key with the mouse cursor placed over the radio button. 
  1339. Figure B.4 shows examples of check boxes and radio buttons.
  1340.  
  1341. Command Buttons
  1342.  
  1343. Command buttons are used to initiate an action in the program.  When used on an
  1344. input screen, they are most often used to either accept or cancel the input data
  1345. entered by the user.  Command buttons consist of a command word enclosed in angle
  1346. brackets, <>.  To select a command button with the keyboard, the user must use
  1347. the <Tab> keys to move the cursor to the command button.  The user then presses
  1348. <Enter> to execute the command.  With the mouse, the user just moves the mouse
  1349. cursor to the command button and clicks the left mouse button.  <Accept> and
  1350. <Cancel> command buttons are shown in Figures B.3 and B.4.
  1351.  
  1352.                         Appendix C:  Configuration File
  1353.  
  1354. A configuration file is a text file which contains the values of several program
  1355. configuration options.  The file can be created with any editor which produces
  1356. ASCII text files.  The keywords of the file and the values of the parameters are
  1357. read in as text strings and must be enclosed in double quotes (").  Each keyword
  1358. and value combination occupies one line of the file.  The keywords and their
  1359. possible values are listed below.  An example of a configuration file is shown
  1360. in Figure C.1.
  1361.  
  1362.       Keyword           Description and Value
  1363.       LOCVAR            Local variable concordance desired.  Value - 1.
  1364.       GBLVAR            Global variable concordance desired.  Value - 1.
  1365.       LOCKEY            Local keyword concordance desired.  Value - 1.
  1366.       GBLKEY            Global keyword concordance desired.  Value - 1.
  1367.       DEFLNG            Default language to use.  Value - 1, 2, or 3 as
  1368.                         described in Section 2.2.2.4.
  1369.       INDENT            The number of spaces to indent structures.  Value - 1
  1370.                         through 10.
  1371.       LINLEN            The number of character to print per line.  Value - 0,
  1372.                         or any positive integer over 50.
  1373.       PAGLNG            The number of lines to print per page.  Value - any
  1374.                         positive integer over 10.
  1375.       HEADER            The one-line header to be printed at the top of each
  1376.                         page.  Value - header string as defined in Section
  1377.                         2.2.1.4.
  1378.  
  1379. +===============  Figure C.1  Sample Configuration File =======================================+
  1380. |                                                                                              |
  1381. |    "LOCVAR"      "1"                                                                         |
  1382. |    "GBLVAR"      "1"                                                                         |
  1383. |    "DEFLNG"      " 1"                                                                        |
  1384. |    "INDENT"      " 4"                                                                        |
  1385. |    "LINLEN"      " 132"                                                                      |
  1386. |    "PAGLNG"      " 55"                                                                       |
  1387. |    "HEADER"      "Date: \D  Time: \T   Filename: \N    Subroutine: \S     Page No: \P"       |
  1388. +==============================================================================================+
  1389.  
  1390.                        Appendix D:  Sample Program File
  1391.  
  1392. DECLARE SUB EndProg ()
  1393. INPUT #1, I
  1394. ' Select case example
  1395. SELECT CASE I
  1396. CASE 1
  1397. PRINT "I="; I
  1398. CASE 2
  1399. PRINT "I="; -I
  1400. CASE 3
  1401. PRINT "I="; 0
  1402. END SELECT
  1403. 'If example
  1404. IF I > 2 THEN
  1405. PRINT "Yes"
  1406. ELSE
  1407. PRINT "No"
  1408. END IF
  1409. 'Do loop example
  1410. J = 1
  1411. DO UNTIL J = 5
  1412. PRINT J
  1413. J = J + 1
  1414. LOOP
  1415. 'For example
  1416. FOR J = 1 TO 10
  1417. PRINT -J
  1418. NEXT J
  1419. CALL EndProg
  1420. END
  1421.  
  1422. SUB EndProg
  1423. J = 5 * 5
  1424. I = 5 ^ .33
  1425. PRINT "Five Squared is: "; J
  1426. PRINT "Cube root of twenty-five is: "; I
  1427. PRINT "End of Program"
  1428. END SUB
  1429.  
  1430.  
  1431.                    Appendix E:  Sample Documentation Output
  1432.  
  1433. The next several pages show the output resulting from the processing of the
  1434. sample program shown in Appendix D. Date: 09-05-1992  Time: 19:47:14   Filename: D:\BASDOC\SAMPLE.BAS    Subroutine:   Main     Page No:   1
  1435.  
  1436.  
  1437.      1   DECLARE SUB EndProg () 
  1438.      2   INPUT #1, I 
  1439.      3   ' Select case example 
  1440.      4   SELECT CASE I 
  1441.      5        CASE 1 
  1442.      6        1    PRINT "I="; I 
  1443.      7        CASE 2 
  1444.      8        2    PRINT "I="; -I 
  1445.      9        CASE 3 
  1446.     10        3    PRINT "I="; 0 
  1447.     11   END SELECT 
  1448.     12   'If example 
  1449.     13   IF I > 2 THEN 
  1450.     14   T    PRINT "Yes" 
  1451.     15   ELSE 
  1452.     16   F    PRINT "No" 
  1453.     17   END IF 
  1454.     18   'Do loop example 
  1455.     19   J = 1 
  1456.     20   DO UNTIL J = 5 
  1457.     21   L    PRINT J 
  1458.     22   L    J = J + 1 
  1459.     23   LOOP 
  1460.     24   'For example 
  1461.     25   FOR J = 1 TO 10 
  1462.     26   N    PRINT -J 
  1463.     27   NEXT J 
  1464.     28   CALL EndProg 
  1465.     29   END 
  1466.  
  1467. Local Variable Cross Reference for Subroutine:   Main
  1468.  
  1469.  
  1470. EndProg                   1     28
  1471. I                         2      4      6      8     13
  1472. J                        19     20     21     22     22     25     26     27
  1473. Local Keyword Cross Reference for Subroutine:   Main
  1474.  
  1475.  
  1476. CALL                     28
  1477. CASE                      4      5      7      9
  1478. DECLARE                   1
  1479. DO                       20
  1480. ELSE                     15
  1481. END                      11     17     29
  1482. FOR                      25
  1483. IF                       13     17
  1484. INPUT                     2
  1485. LOOP                     23
  1486. NEXT                     27
  1487. PRINT                     6      8     10     14     16     21     26
  1488. SELECT                    4     11
  1489.  
  1490.  
  1491.  
  1492. Date: 09-05-1992  Time: 19:47:14   Filename: D:\BASDOC\SAMPLE.BAS    Subroutine:   Main     Page No:   2
  1493.  
  1494.  
  1495. SUB                       1     31
  1496. THEN                     13
  1497. TO                       25
  1498. UNTIL                    20
  1499.  
  1500.  
  1501. Date: 09-05-1992  Time: 19:47:14   Filename: D:\BASDOC\SAMPLE.BAS    Subroutine: EndProg     Page No:   3
  1502.  
  1503.  
  1504.      1   SUB EndProg 
  1505.      2   J = 5 * 5 
  1506.      3   I = 5 ^ .33 
  1507.      4   PRINT "Five Squared is: "; J 
  1508.      5   PRINT "Cube root of twenty-five is: "; I 
  1509.      6   PRINT "End of Program" 
  1510.      7   END SUB 
  1511.  
  1512. Local Variable Cross Reference for Subroutine: EndProg
  1513.  
  1514.  
  1515. EndProg                   1
  1516. I                         3      5
  1517. J                         2      4
  1518. Local Keyword Cross Reference for Subroutine: EndProg
  1519.  
  1520.  
  1521. END                       7
  1522. PRINT                     4      5      6
  1523. SUB                       7
  1524.  
  1525.  
  1526. Date: 09-05-1992  Time: 19:47:14   Filename: D:\BASDOC\SAMPLE.BAS    Subroutine:      Page No:   4
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532. Date: 09-05-1992  Time: 19:47:14   Filename: D:\BASDOC\SAMPLE.BAS    Subroutine:      Page No:   5
  1533.  
  1534.  
  1535.  
  1536. Global Variable Cross Reference
  1537.  
  1538. EndProg                 Main                EndProg             
  1539. I                       Main                EndProg             
  1540. J                       Main                EndProg             
  1541.  
  1542.  
  1543. Date: 09-05-1992  Time: 19:47:14   Filename: D:\BASDOC\SAMPLE.BAS    Subroutine:      Page No:   6
  1544.  
  1545.  
  1546.  
  1547. Table of Contents
  1548.  
  1549.   Subroutine                 File                          Page
  1550.   Main                       D:\BASDOC\SAMPLE.BAS           1 
  1551. EndProg                      D:\BASDOC\SAMPLE.BAS           3 
  1552.  
  1553.                    Appendix F:  Sample Indented Source File
  1554.  
  1555. DECLARE SUB EndProg () 
  1556. INPUT #1, I 
  1557. ' Select case example 
  1558. SELECT CASE I 
  1559.     CASE 1 
  1560.         PRINT "I="; I 
  1561.     CASE 2 
  1562.         PRINT "I="; -I 
  1563.     CASE 3 
  1564.         PRINT "I="; 0 
  1565. END SELECT 
  1566. 'If example 
  1567. IF I > 2 THEN 
  1568.     PRINT "Yes" 
  1569. ELSE 
  1570.     PRINT "No" 
  1571. END IF 
  1572. 'Do loop example 
  1573. J = 1 
  1574. DO UNTIL J = 5 
  1575.     PRINT J 
  1576.     J = J + 1 
  1577. LOOP 
  1578. 'For example 
  1579. FOR J = 1 TO 10 
  1580.     PRINT -J 
  1581. NEXT J 
  1582. CALL EndProg 
  1583. END 
  1584. SUB EndProg 
  1585. J = 5 * 5 
  1586. I = 5 ^ .33 
  1587. PRINT "Five Squared is: "; J 
  1588. PRINT "Cube root of twenty-five is: "; I 
  1589. PRINT "End of Program" 
  1590. END SUB 
  1591.